#ifndef _DQUEUE_H_
#define _DQUEUE_H_

#include "queue.h"

typedef struct {
    queue_t *in;
    queue_t *out;
} dqueue_t;

dqueue_t *dqueue_new(int maxsize);
void      dqueue_del(dqueue_t *q);

#define pput(dqueue, data)  queue_put(dqueue->in, data)
#define cget(dqueue)        queue_get(dqueue->in, data)
#define cput(dqueue, data)  queue_put(dqueue->out, data)
#define pget(dqueue)        queue_get(dqueue->out, data)
#define psize(dqueue)       queue_size(dqueue->in)
#define csize(dqueue)       queue_size(dqueue->out)

#endif
